bitkeeper revision 1.358 (3f1548d1q_6caSqIuMtbsS3JI4fPHA)
authoriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Wed, 16 Jul 2003 12:45:05 +0000 (12:45 +0000)
committeriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Wed, 16 Jul 2003 12:45:05 +0000 (12:45 +0000)
Allow 'setfont' on dom0 VGA text console to keep RH8 happy.
XFree86 now works fine in dom0, at least on ATI Mach64 cards, and probably
others too.

xenolinux-2.4.21-sparse/arch/xeno/kernel/ioport.c
xenolinux-2.4.21-sparse/include/asm-xeno/fixmap.h
xenolinux-2.4.21-sparse/include/asm-xeno/vga.h

index 76c412883f74e109abab2811688e54000392e971..172cc802c93af7afa143967590d89e7056efd2d2 100644 (file)
@@ -40,9 +40,14 @@ asmlinkage int sys_iopl(unsigned int new_io_pl)
 
 asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int turn_on)
 {
-    unsigned int new_io_pl = turn_on ? 3 : 0;
-    printk("ioperm not fully supported - set iopl to %d\n", new_io_pl);
-    return sys_iopl(new_io_pl);
+    if ( turn_on )
+        {
+        printk("ioperm not fully supported - set iopl to 3\n");
+        return sys_iopl(3);
+       }
+    else
+        printk("ioperm not fully supported - ignore resource release\n");
+    return 0;
 }
 
 
index 3dea10fdc62ffd597e172eb95ab576bd0c27f8c1..346dd730b480ff93a570e1945ec5760a3e086220 100644 (file)
@@ -47,10 +47,16 @@ enum fixed_addresses {
        FIX_NETRING1_BASE,
        FIX_NETRING2_BASE,
        FIX_NETRING3_BASE,
-#define NR_FIX_BTMAPS   8  /* 32KB For the Dom0 VGA Console */
+
+#ifdef CONFIG_VGA_CONSOLE
+#define NR_FIX_BTMAPS   32  /* 128KB For the Dom0 VGA Console A0000-C0000 */
+#else
+#define NR_FIX_BTMAPS   1   /* have on page incase anyone wants it in future */
+#endif
         FIX_BTMAP_END,
         FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS - 1,
        /* our bt_ioremap is permenant unlike other architectures */
+
        __end_of_permanent_fixed_addresses,
        __end_of_fixed_addresses = __end_of_permanent_fixed_addresses
 };
index fb3605e55e6269abe57a6571f39905868b7a0740..d0624cf4809c5395836a64e619c9dd224dd11f28 100644 (file)
@@ -24,15 +24,14 @@ static unsigned long VGA_MAP_MEM(unsigned long x)
         if( x != 0xb8000 )
             panic("Argghh! VGA Console is weird. 1:%08lx\n",x);
 
-        vgacon_mmap = (unsigned char*) bt_ioremap( 0xb8000, 32*1024 );
-        return (unsigned long) vgacon_mmap;
+        vgacon_mmap = (unsigned char*) bt_ioremap( 0xa0000, 128*1024 );
+        return (unsigned long) (vgacon_mmap+x-0xa0000);
     }
     else
     {
-        if( x != 0xc0000 )
+        if( x != 0xc0000 && x != 0xa0000 ) /* vidmem_end or charmap fonts */
             panic("Argghh! VGA Console is weird. 2:%08lx\n",x);  
-
-        return (unsigned long) vgacon_mmap + 0x8000;
+       return (unsigned long) (vgacon_mmap+x-0xa0000);
     }
     return 0;
 }